<?xml version="1.0" encoding="UTF-8"?>
<?altova_samplexml file:///C:/Documents%20and%20Settings/cherb/Bureau/books.xml?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions">
	<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
	<xsl:template match="/">
		<books>
			<xsl:apply-templates select="//BookData"/>
		</books>
	</xsl:template>
	<xsl:template match="//BookData">
		<book>
			<xsl:attribute name="isbn">
					<xsl:value-of select="@isbn"/>
			</xsl:attribute>
			<title>
				<xsl:value-of select="Title"/>
			</title>
			<authors>
					<xsl:for-each select="tokenize(AuthorsText, ',')">
						<xsl:if test="string-length(normalize-space(.)) >  0">
							<author>
								<xsl:value-of select="normalize-space(.)"/>
							</author>
						</xsl:if>
					</xsl:for-each>
			</authors>
			<year>
				<xsl:value-of select="PublisherText/substring(., string-length()-4,4)"/>
			</year>
		</book>
	</xsl:template>
	
</xsl:stylesheet>